<script setup lang="tsx">
import { ContentWrap } from '@/components/ContentWrap'
import { Search } from '@/components/Search'
import { defineAsyncComponent, onMounted, ref } from 'vue'
import { Table } from '@/components/Table'
import { useRoute, useRouter } from 'vue-router'
import { BaseButton } from '@/components/Button'
import {
  SysTransferCenterListVo,
  SysTransferCenterSearchQo
} from '@/api/system/file/SysTransferCenter/types'
import {
  sysTransferCenterDeleteApi,
  sysTransferCenterPageApi
} from '@/api/system/file/SysTransferCenter'
import { AllSchemas, useBasePageView } from '@/base/views/BasePageView'
import { TableSortProps } from '@/components/Table/src/types'
import { ElText,ElTabs,ElTabPane } from 'element-plus'
import { sysDictChooseListApi } from '@/api/system/dict/SysDict'
import { KeyLabelValueVo } from '@/base/api/KeyLabelValueVo'
import { selectSysAccountNameListApi } from '@/api/system/account/SysAccount'
// [[ OnflowGenerator Range (- selectFunctionImport -) Start ]]

// [[ OnflowGenerator Range (- selectFunctionImport -) End ]]

defineOptions({
  name: 'MyTransferCenterPage'
})

const route = useRoute()
const tab = route.query.tab as string

const selectTab = ref((tab as string) || 'export')

// 动态导入组件（按需加载）
const components = {
  export: defineAsyncComponent(
    () => import('@/views/my/file/components/MyTransferCenterExportPage.vue')
  ),
  import: defineAsyncComponent(
    () => import('@/views/my/file/components/MyTransferCenterImportPage.vue')
  )
}
</script>

<template>
  <ContentWrap>
    <el-tabs tab-position="top" v-model="selectTab">
      <el-tab-pane label="导出" name="export" :lazy="true">
        <component :is="components.export" v-if="selectTab === 'export'" />
      </el-tab-pane>

      <el-tab-pane label="导入" name="import" :lazy="true">
        <component :is="components.import" v-if="selectTab === 'import'" />
      </el-tab-pane>
    </el-tabs>
  </ContentWrap>

  <!--  <ContentWrap>-->
  <!--    <Search-->
  <!--      :schema="allSchemas.searchSchema"-->
  <!--      @search="getList"-->
  <!--      @reset="getList"-->
  <!--      expandField="id"-->
  <!--      :searchLoading="loading"-->
  <!--      :resetLoading="loading"-->
  <!--    />-->

  <!--    <div class="mb-10px">-->
  <!--      <BaseButton type="primary" @click="addAction" permission="'add'">新增</BaseButton>-->
  <!--      <BaseButton :loading="delLoading" type="danger" @click="delData(null)" permission="'delete'">-->
  <!--        删除-->
  <!--      </BaseButton>-->
  <!--    </div>-->

  <!--    <Table-->
  <!--      v-model:pageSize="pageInfo.pageSize"-->
  <!--      v-model:currentPage="pageInfo.currentPage"-->
  <!--      :columns="allSchemas.tableColumns"-->
  <!--      :data="dataList"-->
  <!--      :loading="loading"-->
  <!--      :stripe="true"-->
  <!--      :pagination="{-->
  <!--        total: pageInfo.totalCount-->
  <!--      }"-->
  <!--      @register="pageView.tableRegister"-->
  <!--      @sort-change="sortChange"-->
  <!--    />-->
  <!--  </ContentWrap>-->
</template>
